<template>
  <div class="home">
    <van-swipe class="my-swipe" :autoplay="3000">
      <van-swipe-item v-for="(item,index) in imgUrl" :key="index">
        <img :src="item.picUrl" width="100%" />
      </van-swipe-item>
    </van-swipe>
    <Nav class="nav">
      <Icon></Icon>
    </Nav>
    <DownPrice></DownPrice>
    <Topics></Topics>
    <Popular></Popular>
  </div>
</template>

<script>
import Nav from "../components/navigation/Nav"//四个图标
import DownPrice from "../components/body/DownPrice"//全民砍价
import Topics from "../components/body/Topics"//精选专题  滑动图片
import Popular from "../components/body/Popular"//人气推荐
export default {
  name: "Home",
  components: {
    Nav,
    DownPrice,
    Topics,
    Popular
  },
  data() {
    return {
      imgUrl: [], //放轮播图
      // People_down_price_goodlist:[]
    };
  },
  mounted() {
    this.$APIClient
      .getStoreList()
      .then((res) => {
        // console.log(res);
      })
      .catch((err) => {
        // console.log(err);
      });
    this.$APIClient.banner().then((res) => {
      // console.log(res.data);
      this.imgUrl = res.data.data;
    });
    // this.$APIClient.Peo_Down_Price().then((res) => {
    //   console.log(res);
    //   this.People_down_price_goodlist=res.data.data.goodsMap;
    // });
  },
};
</script>
<style>
  .nav{
      width: 100%;
      height: 100px;
      border-bottom: 15px solid rgba(128, 128, 128, 0.149);
      position: absolute;
      background: white;
      border-radius: 20px 20px 0px 0px;
      top: 42vh;
  }
</style>
